# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: mightyjaym <jmambrosino@gmail.com>
# Contributor: moostik <mooostik_at_gmail.com>

pkgname=audex
pkgver=0.79+160+gaa00d81
pkgrel=3
pkgdesc="A CDDA extraction tool with a ftp upload function for KDE"
arch=('loong64' 'x86_64')
url="https://userbase.kde.org/Audex"
license=('GPL')
depends=('libkcddb5' 'hicolor-icon-theme' 'kcmutils5' 'qt5-script')
makedepends=('extra-cmake-modules' 'git')
optdepends=('vorbis-tools: OGG encoder'
	'faac: MP4/M4A/AAC encoder'
	'flac: FLAC encoder'
	'lame: MP3 encoder')
_commit=aa00d81acdb9141e589bb9c6eb67032aa52d51f5
source=("git+https://invent.kde.org/multimedia/audex#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd audex
  git describe --tags | sed -e 's/-/+/g' -e 's/v//'
}

build() {
  cd audex

  mkdir build
  cd build

  cmake ../
  make
}

package() {
  cd audex/build

  make DESTDIR="${pkgdir}" install
}
